<?php namespace Modules\Shop\Http\Controllers;


class TagCloudController extends Controller {

    public function getIndex()
    {
        global $_CFG, $ecs, $err, $smarty, $_LANG, $db;

        assign_template();
        $position = assign_ur_here(0, $_LANG['tag_cloud']);
        \Tpl::assign('page_title', $position['title']);    // 页面标题
        \Tpl::assign('ur_here', $position['ur_here']);  // 当前位置
        \Tpl::assign('categories', get_categories_tree()); // 分类树
        \Tpl::assign('helps', get_shop_help());       // 网店帮助
        \Tpl::assign('top_goods', get_top10());           // 销售排行
        \Tpl::assign('promotion_info', get_promotion_info());

        /* 调查 */
        $vote = get_vote();
        if (!empty($vote)) {
            \Tpl::assign('vote_id', $vote['id']);
            \Tpl::assign('vote', $vote['content']);
        }

        assign_dynamic('tag_cloud');

        $tags = get_tags();

        if (!empty($tags)) {
            //include_once(ROOT_PATH . 'includes/lib_clips.php');
            color_tag($tags);
        }

        \Tpl::assign('tags', $tags);

        \Tpl::display('tag_cloud.dwt');
		return view('shop::index');
	}
	
}